# Template: J3.02.P09.T05S
# Copyright (C) 2003-2004, Juniper Networks, Inc.
# All rights reserved.
#
# This Params file is required by 'script_template'.
#
x-params-file-version "$Id: 121_trinity_RLI12699_pim-ssm-v4-egress-filter.pl.params,v 1.3 2012/02/10 12:55:19 anild Exp $";

#x-no-params-expand 1;          # true(1) | false(0)
                                # If set to true, don't expand Params. This may
                                # be useful for static Params, i.e., when there's
                                # no need to resolve constraints. In those cases,
                                # expand may result in constraint errors.

x-show-log 1;                   # true(1) | false(0)
                                # Write log to stdout in addition to log files.

x-log-level "trace";            # info | trace | debug | off

x-cmd-log-level "trace";        # info | trace | debug | off
                                # Log router commands in specified log level.

#x-resp-log-level "trace";      # info | trace | debug | off
                                # Log router response in specified log level.
                                # This option is very verbose. It should only
                                # be used during script debugging.

#x-show-expect-log 1;           # true(1) | false(0)
                                # If set to true, also log expect log.

#x-log-listing-on-close 2;       # If set to 1, show listing of all log files.
                                # If set to 2, show listing of main log file.

#x-no-checkpoint 1;             # true(1) | false(0)
                                # If set to true, don't use router checkpoints.

#x-no-core-chk 1;               # true(1) | false(0)
                                # If set to true, don't check for core files.

#x-no-db-prompt-chk 1;          # true(1) | false(0)
                                # If set to true, don't check for router crash
                                # (i.e., router is at db> prompt). By default,
                                # the check is done at the end of each test case.

#x-no-junos-inventory 1;        # true(1) | false(0)
                                # If set to true, don't collect JUNOS inventory
                                # logs (per TL9000).

#x-no-archive-test-logs 1;      # true(1) | false(0)
                                # If set to true, don't create tar gzip archive
                                # file for JUNOS inventory logs.

x-no-check-interface-status 0; # true(1) | false(0)
                                # If set to true, don't check interface state
                                # and neighbor reachability (during test setup).
                                # Note that interface check is not dependent on
                                # the state of x-no-setup-interfaces.

x-no-check-interface-ping 0;   # true(1) | false(0)
                                # If set to true, don't ping adjacent neighbors
                                # (during test setup). Note that interface ping
                                # is not dependent on the state of
                                # x-no-setup-interfaces nor
                                # x-no-check-interface-status.

#x-no-os-version-chk-on-init 1; # true(1) | false(0)
                                # If set to true, don't do version checking
                                # during init().

#x-no-os-version-chk 1;         # true(1) | false(0)
                                # If set to true, don't do version checking for
                                # the entire program.

#x-no-config-save-on-setup 1;   # true(1) | false(0)
                                # If set to true, don't save (base) router
                                # configs during setup. This also means that
                                # the base configs are not restored on close.

#x-no-base-config-cleanup 1;    # true(1) | false(0)
                                # If set to true, don't clean up the routers'
                                # base configs. Background: cleanup happens
                                # prior to applying the test configs. This token
                                # is ignored if x-setup-only is specified.

#x-no-commit-on-cleanup 1;      # true(1) | false(0)
                                # If set to true, don't commit after base config
                                # cleanup. In fact, wait until after test config
                                # is done, then commit.

#x-no-setup-interfaces 1;       # true(1) | false(0)
                                # If set to true, don't configure router
                                # interfaces (during test setup).

#x-no-commit-on-config-setup 1; # true(1) | false(0)
                                # If set to true, don't commit after setting up
                                # test configs.

#x-no-save-base-test-config 1;  # true(1) | false(0)
                                # If set to true, the base test config will not
                                # be saved. This is the config on the router 
                                # after cleanup, interface setup and user configs
                                # have happened.

#x-sleep-interval-after-test-config 30;
                                # Time to sleep (in seconds) after the test
                                # config has been committed. (default is 5)

#x-setup-only 1;                # true(1) | false(0)
                                # Set up routers only. Don't run tests.

#x-test-only 1;                 # true(1) | false(0)
                                # Run tests only. Don't set up routers.

#x-no-postmortem 1;             # true(1) | false(0)
                                # If set to true, disable postmortem (even if
                                # there is a test failure). This value will
                                # override x-postmortem-always.

#x-postmortem-always 1;         # true(1) | false(0)
                                # If set to true, do postmortem always. If set
                                # to false, do postmortem only when there are
                                # test failures or early program termination.

x-no-restore-config 0;         # true(1) | false(0)
                                # If set to true, don't restore routers' base
                                # configs upon exit. This may be useful during
                                # testing - it saves some time. But when submit
                                # into regression, be sure to set to false or
                                # comment it out.

x-no-restore-config-on-fail 0; # true(1) | false(0)
                                # If set to true, don't restore routers' base
                                # configs upon exit if a test case failed.

#x-timeout-commit-cleanup 100;  # Specify timeout value (in seconds) when
                                # committing after router cleanup in setup().

#x-timeout-commit-test-config 100;
                                # Specify timeout value (in seconds) when
                                # committing router test configs in setup().

#x-timeout-restore-config 100;  # Specify timeout value (in seconds) when
                                # restoring router configs in close().

#x-no-run-set-user-init 1;      # true(1) | false(0)
                                # If set to true, don't run user-defined
                                # callback for init.

#x-no-run-set-user-cleanup 1;   # true(1) | false(0)
                                # If set to true, don't run user-defined
                                # callback for cleanup.

#x-no-run-set-user-configs 1;   # true(1) | false(0)
                                # If set to true, don't run user-defined
                                # callback for (test) configs.

#x-no-run-set-user-chk-status 1;
                                # true(1) | false(0)
                                # If set to true, don't run user-defined
                                # callback for status checks.

#x-no-run-set-user-postmortem 1;
                                # true(1) | false(0)
                                # If set to true, don't run user-defined
                                # callback for postmortem.

#x-no-run-set-user-restore 1;   # true(1) | false(0)
                                # If set to true, don't run user-defined
                                # callback for base config restore.

#x-no-run-set-user-close 1;     # true(1) | false(0)
                                # If set to true, don't run user-defined
                                # callback on closing - i.e., when close()
                                # is called.

#x-params-import        "test_sonet_options.params:test_dual_re.params";
                                # A list of Params files to import before
                                # Params expansion.

#x-params-import-if-true (
#                       "x-re-switch" "my_script.params.re_switch"
#                       "x-my-knob"   "my_script.params.more_knobs"
#                       );
                                # A list of Params files to import before
                                # Params expansion if the condition is true.
                                # In above example, my_script.params.re_switch
                                # is imported if token x-re-switch is true,
                                # and so on...

#x-set-user-init        "&lsp_stitching_0::init_config";             
                                # User callback for user-defined init.
                                # This is a good spot for initializing
                                # various Test user variables used by your
                                # script.

#x-set-user-cleanup     "&Testsuites::Template1::template_user_cleanup";
                                # User callback for user-defined cleanup.
                                # If the default Test cleanup is not good
                                # enough for you, you can add your own.

x-set-user-init                   "&Testsuites::EABU_REG::LIB::Util::configure_hub";
x-my-hub-config-file              "/volume/labtools/lib/Testsuites/EABU_REG/LIB/hubconfig.params";
x-set-user-close                  "&Testsuites::EABU_REG::LIB::Util::unconfigure_hub";

x-set-user-configs      "&Testsuites::Protocols::Multicast::PimSSMEgressFilter::init_config";
                                # User callback for user-defined configs.
                                # Your test configs should go here. For
                                # example, EGP and IGP setup, etc.
                                
x-set-user-chk-status   "&Testsuites::Protocols::Multicast::PimSSMEgressFilter::basic_check";
                                # User callback for user-defined configs.
                                # Your check routine should go here. For
                                # example, you may want to check that EGP
                                # and IGP adjacencies are established.

#x-set-user-postmortem  "&Testsuites::Template1::template_user_postmortem";
                                # User callback for postmortem. Please refer
                                # to the documentation.

#x-set-user-restore     "&Testsuites::Template1::template_user_restore";
                                # User callback for restore. Please refer
                                # to the documentation.

#x-set-user-close       "&Testsuites::Template1::template_user_close";
                                # User callback for close. Please refer
                                # to the documentation.
x-test-topology " 
       
       R0_NAME           R1_NAME           R2_NAME           R3_NAME
       +--------+        +--------+        +--------+        +--------+
       | R0     |        |   R1   |        | R2     |        |  R3    |
       |        |--------|        |--------| C-RP   |--------|        |
       |        |        |        |        |        |        |        |
       +--------+        +--------+        +--------+        +--------+
                            \\                    /
                             \\                  /    
                              \\   R4_NAME      /
                               \\  +--------+  /
                                \\ | R4     | /
                                 \\| RP,P-RP|/
                                  \|        |
                                  \+--------+       
       
       
       
                                                    
                                                   
";
# SUPPORTED ON ALL REGRESSION TEST BEDS 

x-my-ipv4-group       "232.1.1.1" ;
x-my-ipv4-group1      "232.1.1.2" ;
x-my-ipv6-group  "ff3e::1";
x-my-ipv6-group1 "ff3e::2";
x-my-v6-packet-size "200000";
# mcast destination port
x-my-mcast-dst-port "6000";

# default mcast forwarding rate to be used
x-my-mcast-rate "1000";

#x-my-family "inet"; #inet/inet6 based whether the test is PIM/PIMv6
x-my-family "inet6"; #inet/inet6 based whether the test is PIM/PIMv6
 
x-testcase-001 (
         "x-is-run"                 1
         "x-cmd"                    "&Testsuites::Protocols::Multicast::PimSSMEgressFilter::pimSSMGEgressFilter"   
         "x-descr"                  "Basic - G Filter"
         "x-descr-long"             "G Filter: TC 5.2.5.1"
         "x-reset-config"           1
                 );


 x-testcase-002 (
         "x-is-run"                 1
        "x-cmd"                    "&Testsuites::Protocols::Multicast::PimSSMEgressFilter::pimSSMSEgressFilter"   
         "x-descr"                  "S Filter"
         "x-descr-long"             "Basic - S Filter: TC 5.2.5.2"
         "x-reset-config"           1
                 );
       
 x-testcase-003 (
         "x-is-run"                 1
        "x-cmd"                    "&Testsuites::Protocols::Multicast::PimSSMEgressFilter::pimSSMSGEgressFilter"
         "x-descr"                  "S-G Filter"
         "x-descr-long"             "Advanced - S-G Filter: TC 5.2.5.6"
         "x-reset-config"           1
                 );
 x-testcase-004 (
         "x-is-run"                 1
        "x-cmd"                    "&Testsuites::Protocols::Multicast::PimSSMEgressFilter::pimSSMIEgressFilter"
         "x-descr"                  "I Filter"
         "x-descr-long"             "Basic - I Filter: TC 5.2.5.3"
         "x-reset-config"           1
                 );
 x-testcase-005 (
         "x-is-run"                 1
        "x-cmd"                    "&Testsuites::Protocols::Multicast::PimSSMEgressFilter::pimSSMNEgressFilter"
         "x-descr"                  "N Filter"
         "x-descr-long"             "Basic - N Filter: TC 5.2.5.4"
         "x-reset-config"           1
                 );
 x-testcase-006 (
         "x-is-run"                 1
        "x-cmd"                    "&Testsuites::Protocols::Multicast::PimSSMEgressFilter::pimSSMSGNIEgressFilter"
         "x-descr"                  "S-G-N-I Filter"
         "x-descr-long"             "Advanced - S-G-N-I Filter: TC 5.2.5.6"
         "x-reset-config"           1
                 );





# Router Parameters

params-default {
    system {
            #x-os-version "9.6" ;
    }
    interfaces { 
        params-default { 
            type (not (or "ATM" "QPP" "IQ"));
            x-family "iso";
        }
    }
}


r0 {
    interfaces {
        r0_direct {
            all-peers (length 2);
            lone-network   t;
            type  "ether";
            x-loopback     "1";
            x-options "vlan-tagging";
            units {
                1 {
                    x-vlanid "1";
                    x-ip "10.1.1.1/30";
                    x-ipv6 "::10.1.1.1/126";

                }
           }
   }

            r0-r1 {
                x-ip "25.0.0.1/30";
                x-ipv6 "::25.0.0.1/126";
                all-peers (length 2);
            }
    }
}


r1 {
    x-dut 1;
   system { 
           model  (or "mx240" "mx480" "mx960");
}
            
    interfaces {
            r0-r1 {
                x-ip "25.0.0.2/30";     
                x-ipv6 "::25.0.0.2/126";     
                all-peers (length 2);  
                type "ether";
            }
            r1-r2 {
                type (and "ether" (or "MPC1-Q" "MPC2-EQ" "MPC2-Q" "AMPC"));
                x-ip "25.1.0.1/30";
                x-ipv6 "::25.1.0.1/126";
                all-peers (length 2);
            }
            r1-r4 {
                type (and "ge" (or "MPC1-Q" "MPC2-EQ" "MPC2-Q" "AMPC"));
                x-ipv6 "::25.2.0.1/126";
                x-ip "25.2.0.1/30";
                all-peers (length 2); 
            }
            r1-gr {
                type "gr"; 
                lone-network t; 
                x-no-check-interface-status "1" ;
                x-no-check-interface-ping  "1" ;
            }
    }
}


r2 {
   system { 
            model  (or "mx240" "mx480" "mx960");
}
    x-dut 2; 
    interfaces {
            r1-r2 {
                type (and "ether" (or "MPC1-Q" "MPC2-EQ" "MPC2-Q" "AMPC"));
                x-ip "25.1.0.2/30"; 
                x-ipv6 "::25.1.0.2/126"; 
                all-peers (length 2);
            }
            r2-r3 {
                type (or "ge" "fe");
                x-ip "25.3.0.1/30";
                x-ipv6 "::25.3.0.1/126";
                all-peers (length 2);    
            }
            r2-r4 {
                type (and "ether" (or "MPC1-Q" "MPC2-EQ" "MPC2-Q" "AMPC"));
                x-ip "25.4.0.1/30"; 
                x-ipv6 "::25.4.0.1/126"; 
                all-peers (length 2);
            }
            r2-gr {
                type "gr";  
                lone-network t;
                x-no-check-interface-status "1" ;
                x-no-check-interface-ping  "1" ;
            }
    }
}

r3 {
   system { }
    interfaces {
            r2-r3 {
                type (or "ge" "fe");
                x-ip "25.3.0.2/30";  
                x-ipv6 "::25.3.0.2/126";  
                all-peers (length 2);
            }
    }
}


r4 {
    system {  
            model  (or "mx240" "mx480" "mx960");
}
    x-dut 3;
    interfaces {
            r1-r4 {
                #type (and "ether" (or "MPC1-Q" "MPC2-EQ" "MPC2-Q" "AMPC"));
                 type "ge";
                x-ip "25.2.0.2/30";  
                x-ipv6 "::25.2.0.2/126";  
                all-peers (length 2);
            }
            r2-r4 {
                #type (and "ether" (or "MPC1-Q" "MPC2-EQ" "MPC2-Q" "AMPC"));
                  type "ether";
                x-ip "25.4.0.2/30";  
                x-ipv6 "::25.4.0.2/126";  
                all-peers (length 2);
            }
            r4-gr {
                type "gr"; 
                lone-network t;
                x-no-check-interface-status "1" ;
                x-no-check-interface-ping  "1" ;
            }
    }
}
